package bkgm;
/*
 * DataContainer.java
 * This class is used to provide the storage of the corresponding integer and float values
 *CMPT 310 - Assignment 2 - Parts 1 and 2
 *@author: Andriy Baranskyy, Egor Chalubeyeu
 *@email: abaransk@sfu.ca, egorc@sfu.ca
 */
public class DataContainer 
{
    private int index;
    private float value;
    public DataContainer()
    {
    }

    public DataContainer(int index, float value)
    {
        this.index=index;
        this.value=value;
    }
    public DataContainer(DataContainer d)
    {
        this.index = d.index;
        this.value = d.value;
    }
    public int getIndex()
    {
        return this.index;
    }
    public float getValue()
    {
        return this.value;
    }
    public void setTo(int index, float value)
    {
        this.index = index;
        this.value = value;
    }
    public void setTo(DataContainer d)
    {
        this.index = d.index;
        this.value = d.value;
    }
}
